*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  /*    outline: 3px solid red; 💥 See all element bounds */
}

:root {
  --pinkgradient: linear-gradient(45deg, #d29bec, #9C2460);
  --darkgradient: linear-gradient(45deg, #333333, #252525);
}

html, body {
  width: 100%;
  overflow-x: hidden; /* 💥 Prevent horizontal scrolling */
}

h1, h2, h3, .highlight {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; /* Bold headers */
}

section h2 {
  font-size: 2em;
  text-align: center;
  margin-bottom: 1em;
  font-size: 2em
  margin: 2em auto 1em;
  color: #d29bec;
  position: relative;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* Optional underline accent for polish */
section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--pinkgradient);
  margin: 0.5em auto 0;
  border-radius: 3px;
}



body, p, a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
}

b {color:#d29bec; font-weight: 800;}

img {
  max-width: 100%;
  height: auto;
  display: block; /* Avoid inline gaps */
}

/* USE TO TEST BORDERS OF AN ELEMENT 
border: 5px solid red;

*/

.grid-separator {
  width: 100%;
  border: 0;
  border-top: 1px solid #d184ab;
  margin: 3em 0;
}


/* Gradient text */ 

.gradient-text {
  background: linear-gradient(45deg, #d29bec, #9C2460);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* for Firefox */
  color: transparent;
}

/* fonts */

 a:not(.nav-link) {
   color: #9c2460;
    text-decoration: none;
     font-weight: 800;
 font-size: 1.2em;
 }

  a:hover {
   color: #d184ab;
   transform: scale(1.2);
   transition: 0.2s ease-in-out;
 }

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2em;
  background-color: #E6ABC6;
   box-sizing: border-box;
   z-index: 1000;
}

.nav-link {
display: inline-block;
padding: 0.9em 0.9em;  
 font-weight: 800;
  height: 100%;
 font-size: 1.2em;
 color: #4E596E;
 box-sizing: border-box;
 text-decoration: none;
}

.nav-link:hover {
 font-weight: 800;
 font-size: 1.2em;
color: white;
 background-color: #E6549E;
 cursor: pointer;
}

.nav-toggle {
  display: none;
  font-size: 2em;
  cursor: pointer;
  padding: 0.5em 1em;
  color: #4E596E;
}



body {
  text-align: center;
  padding-top: 60px;
  background: linear-gradient(90deg, #F1DFDC, #f4e6ec);
}

/* WELCOME SECTION START */

#welcome-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 4em 5vw;
  background-color: #111;
  color: white;
  overflow-x: hidden; /* Prevents overflow */
}

.welcome-left {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  padding: 1em;
}

.welcome-left h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
}

.highlight {
  color: #d29bec;
  font-weight: bold;
}

.welcome-left h3 {
  font-size: 1.5em;
  margin-bottom: 1em;
  color: #d0d0d0;
}

.welcome-left p {
  margin-bottom: 1em;
  line-height: 1.5;
  color: #ccc;
}

#profile-link {
  display: inline-block;
  background-color: #d29bec;
  color: black;
  padding: 0.8em 1.2em;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease-in-out;
}

#profile-link:hover {
  background-color: #a637da;
}

/* Right side image */
.welcome-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1em;
}

.welcome-img {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
}

/* WELCOME SECTION END */


/* LOGOS SECTION START */

.logos-section {
  background-color: #1a1a1a;
  padding: 3em 2em;
  text-align: center;
  overflow: hidden;
  margin-bottom: 3em;
}


/* Center the scroll area, max 65% of viewport */
.logos-scroll-wrapper {
  overflow-x: hidden;
  position: relative;
  width: 65vw;          /* 65% of viewport width */
  margin: 0 auto;       /* Center it */
}

/* Scrolling container */
.logos-scroll {
  display: flex;
  gap: 5em;
  animation: scroll-logos 30s linear infinite;
  width: max-content; /* Let content size define the width */
}

.logos-scroll img {
  height: 100px;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.logos-scroll img:hover {
  filter: grayscale(0%);
  opacity: 1;
}




/* Animate full scroll of content width */
@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* LOGOS SECTION END */

#projects {background-color: rgb(50, 50, 50); margin:0; padding: 0;}

.projects-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-gap: 2rem;
width: 100%;
max-width: 1280px;
margin: 0 auto;
align-items: start;
padding-bottom: 2em;
}



.project-tile {
  background: #404040;
  margin: 0.3em 0;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}


.project-desc {
  padding: 0.5rem 0.5rem;
  margin-top: 0.5rem;
  font-weight: 300;
  font-size:smaller;

}

h3 {
  padding: 1em;
  margin-top: -0.5em;
  font-size: 1.5em;
}


#projects h2 {
  padding-top: 1em;
  color: #d29bec; /* Accent */
}

.coming-soon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 17, 17, 0.75); /* Dark transparent overlay */
  color: #d29bec; /* Accent text color */
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  border-radius: 0; /* Match image corners if needed */
  z-index: 2;
  pointer-events: none; /* Ensures clicks go through */
  text-shadow: 1px 1px 4px black;
}


/* FANCY CSS IMAGE ANIMATION START */

.project-img-container::before,
.project-img-container::after,
.project-img-container .top-border,
.project-img-container .left-border {
  z-index: 1; /* Ensure borders appear above the image */
}

.project-img-container {
  position: relative;
  display: inline-block;
}

.project-img {
  display: block;
  width: 100%;
  max-width: 300px;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.3);
  filter: brightness(1);
  transition: filter 0.3s ease-in-out;
  border-radius: 0; /* Square corners for matching border */
}

/* Darken on hover */
.project-img-container:hover .project-img {
  filter: brightness(0.8);
}

/* Border lines - bottom and right (pseudo-elements) */
.project-img-container::before,
.project-img-container::after {
  content: "";
  position: absolute;
  background-color: #d184ab;
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}

/* Inset spacing with em units */
.project-img-container::before {
  height: 0.15em;
  width: 0%;
  bottom: 0.9em;
  left: 0.9em;
}

.project-img-container::after {
  width: 0.15em;
  height: 0%;
  bottom: 0.9em;
  right: 0.9em;
}

/* Top and left borders as spans */
.project-img-container .top-border,
.project-img-container .left-border {
  content: "";
  position: absolute;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}

/* Top border */
.project-img-container .top-border {
  height: 0.15em;
  width: 0%;
  top: 0.9em;
  right: 0.9em;
}

/* Left border */
.project-img-container .left-border {
  width: 0.15em;
  height: 0%;
  top: 0.9em;
  left: 0.9em;
}

/* Animations */
.project-img-container:hover::before {
  animation: drawBottom 0.3s forwards;
}

.project-img-container:hover::after {
  animation: drawRight 0.3s 0.3s forwards;
}

.project-img-container:hover .top-border {
  animation: drawTop 0.3s 0.6s forwards;
}

.project-img-container:hover .left-border {
  animation: drawLeft 0.3s 0.9s forwards;
}

/* Keyframes with em-based calculations */
@keyframes drawBottom {
  to { width: calc(100% - 2em); }
}

@keyframes drawRight {
  to { height: calc(100% - 2em); }
}

@keyframes drawTop {
  to { width: calc(100% - 2em); }
}

@keyframes drawLeft {
  to { height: calc(100% - 2em); }
}


/* FANCY CSS IMAGE ANIMATION END */



/* Featured Work Masonry Layout */

#featured-work {
  background-color: #f4e6ec;
  padding: 3em 2em;
  text-align: center;
}

#featured-work img {
background-color: #C0BABA; /* Uniform light background */
}

#featured-work h2 {
  margin-top: -1.5em;
  margin-bottom: 1em;
  font-size: 2em;
}


.masonry-grid {
  column-count: 5;
  column-gap: 1em;
  max-width: 1400px;
  margin: 0 auto;
}

.masonry-grid img {
  width: 100%;
  margin-bottom: 1em;
  border-radius: 10px;
  display: block;
  break-inside: avoid;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}



  /* Contact Section Styling */

#contact {
  background-color: #111;
  color: white;
  padding: 4em 2em;
  text-align: center;
}

#contact h2 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  color: #d29bec; /* Accent */
}

#contact p {
  font-size: 1.2em;
  margin-bottom: 2em;
  color: #ccc;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
}

.contact-links a {
  color: #d29bec;
}

.contact-link {
  display: inline-block; 
  background: var(--darkgradient);
  padding: 0.8em 1.2em;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}


.contact-link i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  margin-bottom: 0.2em;
  color: #d29bec;
  transition: color 0.3s ease;

}

.contact-link:hover {
  background: var(--pinkgradient);
  color: #111;
  transform: scale(1.05);
}

.contact-link:hover i {
  color: #111;
}

.contact-photo-wrapper {
  display: flex;
  justify-content: center;
  margin: 2em 0 1em 0;
}

.contact-photo {
  width: 9em;  /* approx 144px at 16px base font */
  height: 9em;
  border-radius: 50%;
  object-fit: cover;
  border: 0.25em solid #d29bec; /* Accent border */
  box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.3);
}

.disclaimer {
  margin-top: 2em;
  font-size: 0.9em;
  color: #888;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 1em;
  border-top: 1px solid #ccc;
}



  /* Contact Section Styling End */

  /* Skills Section Styling Start */

  #skills-section {
    background: linear-gradient(135deg, #4A90E2, #D95F89);
    padding: 3em 2em;
    text-align: center;
    position: relative; /* Ensures control over stacking */
    z-index: 1;
    width: 100%;
  }
  
  #skills-section h2 {
    font-size: 2.2em;
    margin-bottom: 1em;
    color: #333;
  }
  
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 equal columns */
    gap: 2em;
    justify-items: center; /* Center items in each column */
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
  }
  
  /* Category bubble (large) */
  .category-bubble {
    background: linear-gradient(90deg, #F1DFDC, #e4d1d9);
    padding: 1em 1.5em;
    border-radius: 2em;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 1em;
    transition: all 0.3s ease-in-out;
    cursor: default;
  }
  
  /* Skill bubble (small) */
  .skill-bubble {
    background: linear-gradient(90deg, #F1DFDC, #f4e6ec);
    padding: 0.5em 1em;
    border-radius: 2em;
    font-size: 0.9em;
    margin: 0.3em;
    display: inline-block;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
  }
  
  /* Hover effect for skill bubbles */
  .skill-bubble:hover {
    background: #333;
    color: #fff;
    transform: scale(1.1);
  }
  
  /* Wrap skill items under category */
  .skill-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
  }


  
  /* Skills Section Styling End */

  /* ==========================
   CASE STUDY SECTION - BASE
   ========================== */

.case-study {
  padding: 4em 1em;
  width: 100%;
  margin: 0 auto;
  text-align: left;
  color: #fff;
  background-color: #1a1a1a;
  box-sizing: border-box;
}

.case-study h1 {
  text-align: center;
  margin-bottom: 2em;
  font-size: 2.5em;
}

.case-study h2 {
  color: #d29bec;
  margin-bottom: 0.5em;
}

.case-study p {
  font-size: 1em;
  padding: 0.5em 0;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.case-study li {
  margin-top: 1em;
  margin-left: 1.2em;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.main-logo {
  max-width: 50vw;
  margin: 0 auto;
}



.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
  max-width: 1200px;
  margin: 0 auto 4em auto;
  box-sizing: border-box;
}

.cs-section {
  margin-bottom: 2em;
  max-width: 100%;
  box-sizing: border-box;

}

/* Autogrid gallery section */

.cs-section-gallery {
  margin: 4em auto;
  padding: 0 5vw;
  max-width: 90vw;
  text-align: center;
}

.cs-section-gallery h2,
.cs-section-gallery h3 {
  margin-bottom: 1em;
  color: #d29bec;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
  margin-top: 1em;
}

.gallery-grid img {
  width: 100%;
  height: 100%; /* Or whatever fixed height you want */
  object-fit: cover; /* Crops and keeps aspect ratio */
  border-radius: 10px;
  background-color: #C0BABA;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

/* Section Description with Scrolling */

.section-description {
  margin-top: 1.5em;
  font-size: 1.1em;
  color: #ccc;
  font-style: italic;
  max-width:90vw;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1em;
  opacity: 0;
  padding: 1em;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background-color: #333;
  border-radius: 2em;
}

.section-description.visible {
  opacity: 1;
  transform: translateY(0);
}


.complimg {
  max-width: 50%;
  height: auto;
  display: block;
  margin: 1em auto;
}

/* Optional: temporary overflow debugging */
/* * { outline: 1px solid red; } */
  
  /* 🎯 New: Grid Layout for Sections */
  .cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2em;
    max-width: 1200px;
    margin: 0 auto 4em auto;
  }
  
  /* 🎯 New: Full-Width Gallery Section */
  .gallery-section {
    width: 100%;
    padding: 2em;
    background-color: #1a1a1a;
    margin-top: 4em;
  }
  
  .gallery-section h2 {
    color: #d29bec;
    margin-bottom: 1em;
    text-align: center;
  }
  
  /* 🎯 Carousel Styling */
  .carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .carousel-container {
    position: relative;
    width: 100%;
    padding: 5em;
  }
  
  .carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    min-width: calc(310px * 9); /* Total images * image width */
  }
  
  .carousel-img {
    max-width: 300px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .carousel-img:hover {
    transform: scale(1.1);
  }
  
  .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(210, 132, 171, 0.8);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
  }
  
  .carousel-btn.prev {
    left: 10px;
  }
  
  .carousel-btn.next {
    right: 10px;
  }
/* Case Studies Styling End */

/* RESULTS Styling Start */

:root {
  --pinkgradient: linear-gradient(135deg, #d29bec, #9C2460);
}

.results-section {
  margin-top: 4em;
  padding: 2em 1em;
  background-color: #1a1a1a;
  border-top: 1px solid #d184ab;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.results-section h2 {
  color: #d29bec;
  margin-bottom: 1em;
  font-size: 2em;
  text-align: center;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2em;
  padding: 0 1em;
}

/* Glassmorphic Effect + Hover */
.result-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1em;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2em;
  text-align: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

.result-card:hover {
  background: var(--pinkgradient);
  transform: scale(1.03);
  color: white;
}

/* Emoji Styling */
.result-card h3 {
  font-size: 1.2em;
  color: #d184ab;
  margin-bottom: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-card h3::first-line {
  font-size: 3em; /* Emoji size */
  line-height: 1;
}

.result-card p {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5em;
  font-weight: bold;
  margin: 0;
  color: white;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.result-card a {
  color: #79c9f7;
  text-decoration: none;
}

.result-card a:hover {
  text-decoration: underline;
}




/* Lightbox Base */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dims page */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.lightbox.hidden {
  display: none;
}

/* Lightbox Image Container */
.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  position: relative;
  padding: 1em;
  box-sizing: border-box;
}

/* Lightbox Image */
.lightbox-content img {
  width: 100%;
  height: auto;
  max-width: 90vw; /* Fit within 90% of viewport width */
  max-height: 90vh; /* Fit within 90% of viewport height */
  object-fit: contain; /* Ensures aspect ratio is preserved */
  border-radius: 10px;
  background-color: #C0BABA; /* 👈 Add a subtle background for transparent PNGs */
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Close Button */
.lightbox-close {
  position: absolute;
  top: -20px;
  right: -20px;
  background: #d29bec;
  color: #fff;
  font-size: 2rem;
  padding: 0.2em 0.5em;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: #b56fd8;
}

/* =================== MEDIA QUERIES =================== */

/* Max Width: 1200px */
@media (max-width: 1200px) {
  .masonry-grid {
    column-count: 3;
  }
}


/* Max Width: 900px */
@media screen and (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Max Width: 600px */
@media screen and (max-width: 600px) {
  nav {
    max-width: 100%;
    overflow-x: hidden;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
    padding: 0.5em;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.5em;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-link {
    padding: 0.5em 1em;
    font-size: 1em;
    width: 100%;
  }

  .results-section {
    padding: 1.5em 1em;
    margin-top: 3em;
  }

  #welcome-section {
    flex-direction: column;
    padding: 2em 1em;
  }

  .welcome-left h1 {
    font-size: 2em;
  }

  .welcome-img {
    width: 100%;
    max-width: 300px;
  }

  .logos-scroll {
    gap: 1.2em;
    animation-duration: 40s; /* slower scroll */
  }

  .logos-scroll img {
    height: 50px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    grid-gap: 1rem;
    padding: 0 1em;
  }

  .project-tile {
    margin: 0.5em 0;
    padding: 0.75rem;
  }

  h3 {
    font-size: 1.1em;
  }

  .project-desc {
    font-size: 0.9em;
    font-weight: lighter;
    padding: 0.4rem 0.8rem;
  }

  .project-img {
    max-width: 100%;
  }

  .project-img-container::before,
  .project-img-container::after,
  .project-img-container .top-border,
  .project-img-container .left-border {
    height: 0.1em;
    width: 0.1em;
  }

  .project-img-container::before,
  .project-img-container::after {
    bottom: 0.6em;
    left: 0.6em;
    right: 0.6em;
  }

  .project-img-container .top-border {
    top: 0.6em;
    right: 0.6em;
  }

  .project-img-container .left-border {
    top: 0.6em;
    left: 0.6em;
  }

  @keyframes drawBottom {
    to { width: calc(100% - 1.2em); }
  }

  @keyframes drawRight {
    to { height: calc(100% - 1.2em); }
  }

  @keyframes drawTop {
    to { width: calc(100% - 1.2em); }
  }

  @keyframes drawLeft {
    to { height: calc(100% - 1.2em); }
  }

  .contact-link {
    width: 60%;
    text-align: center;
  }

  .category-bubble {
    font-size: 1em;
  }

  .skill-bubble {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    column-count: 1;
  }

  .carousel-img {
    max-width: 50vw;
    margin-right: 5px;
  }

  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.3rem 0.6rem;
  }

  .case-study {
    padding: 2em 1em;
  }

  .cs-section {
    max-width: 90vw;
    margin-bottom: 2em;
    padding: 0 0.5em;
  }

  .case-study h1 {
    font-size: 1.8em;
    line-height: 1.2;
  }

  .case-study h2 {
    font-size: 1.3em;
  }

  .case-study p,
  .case-study li {
    font-size: 1em;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5em;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    padding: 1em 0.5em;
  }

  .result-card {
    padding: 1em;
    font-size: 0.9em;
  }

  .carousel-img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .carousel-container {
    padding: 1em;
  }

  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.3rem 0.6rem;
  }

  .gallery-section h2 {
    font-size: 1.5em;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }



}

@media screen and (max-width: 500px) {
  .case-study p {
    font-size: 0.95em;
    padding: 0 0.25em; /* Reduce side padding */
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5em;
  }

  .case-study h1 {
    font-size: 1.6em;
    line-height: 1.2;
  }

  .case-study h2 {
    font-size: 1.2em;
  }

  .case-study li {
    font-size: 0.95em;
    line-height: 1.4em;
  }
}
